import java.util.Random;
import java.util.Scanner;

/**
 * @Author 12629
 * @Description：
 */
public class Test {

    public static void main(String[] args) {

        for (int i = 0; i < 999999; i++) {
            //先算i是几位数
            //123  123 / 10 = 12  12/10 = 1  1/10 = 0
            int count = 0;
            int tmp = i;
            while (tmp != 0) {
                count++;
                tmp /= 10;
            }
            //count = 3

            //求每一位上是几 ?
            tmp = i;//123
            int sum = 0;
            while (tmp != 0) {
                sum += Math.pow(tmp % 10,count);
                //sum = sum + Math.pow(tmp % 10,count);
                tmp /= 10;
            }

            if(sum == i) {
                System.out.println(i);
            }
        }
    }

    public static void main17(String[] args) {
        int a = 18;
        int b = 24;
        int c = a%b;
        while (c != 0) {
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println(b);
    }

    public static void main16(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println(Math.max(a, b));//20
        System.out.println(Math.abs(a - b));//10
        System.out.println(Math.min(a, b));//10

        System.out.println(Math.pow(2, 3));//8
    }

    public static void main15(String[] args) {
        //int n = 7;
        for (int k = 1; k <= 100; k++) {
            int i = 2;
            for ( ;i <= Math.sqrt(k); i++) {
                if(k % i == 0) {
                    break;
                }
            }
            if(i > Math.sqrt(k)) {
                System.out.println(k);
            }
        }

    }
    public static void main14(String[] args) {
        int n = 7;
        int i = 2;
        for ( ;i <= Math.sqrt(n); i++) {
            if(n % i == 0) {
                break;
            }
        }
        if(i > Math.sqrt(n)) {
            System.out.println(n);
        }
    }
    public static void main13(String[] args) {
        Scanner scanner = new Scanner(System.in);

        Random random = new Random();
        int num = random.nextInt(100);//[0-100)
        System.out.println(num);

        while (true) {
            System.out.println("请输入你要猜的数字：");
            int n = scanner.nextInt();
            if(n > num) {
                System.out.println("n > num");
            }else if(n == num) {
                System.out.println("n == num");
                break;
            }else {
                System.out.println("n < num");
            }
        }
    }


    public static void main12(String[] args) {
        Scanner scanner = new Scanner(System.in);

        while (scanner.hasNextInt()) {//ctr+d
            int a = scanner.nextInt();
            System.out.println(a);
        }
    }

    public static void main11(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入你的年龄：");
        int age = scanner.nextInt();
        System.out.println("年龄："+age);

        scanner.nextLine();

        System.out.println("请输入你的姓名：");
        String name = scanner.nextLine();
        //String name = scanner.next();//遇到空格结束
        System.out.println("姓名："+name);


        //scanner.nextLine(); 前面是一个 字符串 那么就不要写这条语句

        System.out.println("请输入你的体重：");
        double h = scanner.nextDouble();
        System.out.println("体重："+h);

        scanner.nextLine();
    }

    public static void main10(String[] args) {
        System.out.println("输出且换行");
        System.out.print("输出不换行");
        System.out.printf("%d\n",10);
    }

    public static void main9(String[] args) {
        int i = 0;
        do {
            System.out.println(i);
            i++;
        }while (i != 0);
    }

    public static void main8(String[] args) {

        /*for(int i = 1;i <= 10;i++) {
            System.out.println(i);
        }*/

        //fori
        /*for (int i = 1; i <= 100; i++) {
            System.out.println(i);
        }*/

        //1! + 2! + 3! + 4! + 5!

        int sum = 0;
        for (int j = 1; j <= 5; j++) {
            int ret = 1;
            for (int i = 1; i <= j; i++) {
                ret *= i;
            }
            sum += ret;
        }
        System.out.println(sum);//sum.sout

    }

    //请你找到1-100之间 既能被3整除 又能被5整除的所有的数字 要求：要么使用break 要么使用continue
    public static void main7(String[] args) {
        //IDEA 快速对齐格式  快捷键
        int i = 1;
        while (i <= 100) {
            if(i % 15 != 0) {
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }

    public static void main6(String[] args) {
        int i = 1;
        while (i <= 10) {
            if(i == 3) {
                i++;
                continue;
                //System.out.println("fdsafas");
            }
            System.out.println(i);
            i++;
        }
    }

    public static void main5(String[] args) {
        //1! + 2! + 3! + 4! +5!
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();//6
        int j = 1;
        int sum = 0;
        while (j <= n) {
            int i = 1;
            int ret = 1;
            while (i <= j) {
                ret *= i;
                i++;
            }
            sum += ret;
            j++;
        }
        System.out.println(sum);
    }


    public static void main4(String[] args) {
       //1! + 2! + 3! + 4! +5!
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();//5
        int i = 1;
        int ret = 1;
        while (i <= n) {
            ret *= i;
            i++;
        }
        System.out.println(ret);
    }

    public static void main3(String[] args) {
        //double a = 1.0f;
        //boolean a = true;
        String a = "true";
        switch (a) {
            case "1":
                System.out.println("1");
                break;
            case "2":
                System.out.println("2");
                break;
            default:
                System.out.println("3");
                break;
        }
    }
    public static void main2(String[] args) {
        int x = 10;
        if(x == 20) {
            System.out.println("hello");
        }
    }
    public static void main1(String[] args) {
        /*System.out.println("22");
        System.out.println("33");
        System.out.println("11");
*/
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        if(a % 2 == 0) {
            System.out.println("偶数");
        }else {
            System.out.println("不是偶数");
        }
    }
}
